<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>浏览器对es模块化语法的支持</h1>
</body>
<!-- 必须通过http协议访问该文件, 不能通过浏览器直接打开 -->
<script type="module" src="./tools.js"></script>
<script type="module">
    import tools from './tools.js';
    console.log(tools);
    console.log(tools.add(100,200));
</script>
</html>